﻿<Window x:Class="Dispatcher.Views.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
        Title="Dispatcher" Height="480" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="CanResizeWithGrip"
        Loaded="Window_Loaded">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Menu Height="21">
      <MenuItem Header="File">
        <MenuItem Header="Save" Command="Save"/>
        <MenuItem Header="Undo" Command="Undo"/>
        <Separator/>
        <MenuItem Header="Close" Command="Close"/>
      </MenuItem>
            <MenuItem Header="_Edit" Name="editMenu">

                <MenuItem Header="_Undo" Command="Undo" Name="item1">
                    <MenuItem.Icon>
                        <Image Source="Images/Undo.png" Height="16"/>
                    </MenuItem.Icon>
                </MenuItem>

                <MenuItem Header="_Redo" Command="Redo" Name="item2">
                    <MenuItem.Icon>
                        <Image Source="Images/Redo.png" Height="16"/>
                    </MenuItem.Icon>
                </MenuItem>

                <Separator/>

                <MenuItem Header="Cu_t" Command="Cut" Name="item3">
                    <MenuItem.Icon>
                        <Image Source="Images/Cut.png" Height="16"/>
                    </MenuItem.Icon>
                </MenuItem>

                <MenuItem Header="_Copy" Command="Copy" Name="item4">
                    <MenuItem.Icon>
                        <Image Source="Images/Copy.png" Height="16"></Image>
                    </MenuItem.Icon>
                </MenuItem>

                <MenuItem Header="_Paste" Command="Paste" Name="item5">
                    <MenuItem.Icon>
                        <Image Source="Images/Paste.png" Height="16"></Image>
                    </MenuItem.Icon>
                </MenuItem>

                <MenuItem Header="_Delete" Command="ApplicationCommands.Delete" Name="item6">
                    <MenuItem.Icon>
                        <Image Source="Images/Delete.png" Height="16"></Image>
                    </MenuItem.Icon>
                </MenuItem>
                <Separator/>
                <MenuItem Header="Select _All" Command="SelectAll" Name="item7"/>

            </MenuItem>
            <MenuItem Header="_Object sets" ItemsSource="{Binding ObjectSetMenuItems}"/>
            <MenuItem Header="_Help">
                <MenuItem Header="_About"/>
            </MenuItem>
        </Menu>
        <ToolBarTray Grid.Row="1" Name="ToolBarTray">

            <ToolBar Name="StandartToolBar">

                <ToolBar.Resources>
                    <Style TargetType="{x:Type Image}">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
                                <Setter Property="Opacity" Value="0.30" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </ToolBar.Resources>

                <Button Command="New">
                    <Image Source="Images/NewDocument_16x16.png" Height="16"/>
                    <Button.ToolTip>New (Ctrl+N)</Button.ToolTip>
                </Button>

                <Button Command="Open">
                    <Image Source="Images/Open_16x16.png" Height="16"/>
                    <Button.ToolTip>Open (Ctrl+O)</Button.ToolTip>
                </Button>

                <Button Command="Save" Name="button7">
                    <Image Source="Images/Save_16x16.png" Height="16"/>
                    <Button.ToolTip>Save (Ctrl+S)</Button.ToolTip>
                </Button>

                <Separator/>

                <Button Name="button1" Command="Cut">
                    <Image Source="Images/Cut.png" Height="16"/>
                    <Button.ToolTip>Cut (Ctrl+X)</Button.ToolTip>
                </Button>

                <Button Name="button2" Command="Copy">
                    <Image Source="Images/Copy.png" Height="16"/>
                    <Button.ToolTip>Copy (Ctrl+C)</Button.ToolTip>
                </Button>

                <Button Name="button3" Command="Paste">
                    <Image Source="Images/Paste.png" Height="16"/>
                    <Button.ToolTip>Paste (Ctrl+V)</Button.ToolTip>
                </Button>

                <Button Name="button4" Command="ApplicationCommands.Delete">
                    <Image Source="Images/Delete.png" Height="16"/>
                    <Button.ToolTip>Delete (Del)</Button.ToolTip>
                </Button>

                <Separator/>

                <Button Name="button5" Command="Undo">
                    <Image Source="Images/Undo.png" Height="16"/>
                    <Button.ToolTip>Undo (Ctrl+Z)</Button.ToolTip>
                </Button>

                <Button Name="button6" Command="Redo">
                    <Image Source="Images/Redo.png" Height="16"/>
                    <Button.ToolTip>Redo (Ctrl+Y)</Button.ToolTip>
                </Button>

            </ToolBar>

        </ToolBarTray>
        <ad:DockingManager Grid.Row="2" DocumentsSource="{Binding Documents}" Name="DockManager">
      <ad:ResizingPanel>
        <ad:DockablePane ad:ResizingPanel.ResizeWidth="200" >
        </ad:DockablePane>
        <ad:DocumentPane Name="DocPane"/>
      </ad:ResizingPanel>
    </ad:DockingManager>
    <StatusBar Grid.Row="3" Name="StatusBar" Height="21">
      <StatusBarItem Name="Status" Content="{Binding Status}" HorizontalContentAlignment="Right" HorizontalAlignment="Right"/>
    </StatusBar>
  </Grid>
</Window>
